<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang='en'>
  <head>
    <title>KRPC::Doc</title>
    <meta content='text/html; charset=UTF-8' http-equiv='Content-Type'>
    <link href='../../css/style.css' media='screen' rel='stylesheet' type='text/css'>
    <script type='text/javascript'>
      //<![CDATA[
        function popupCode(url) {
          window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
        }
        
        function toggleCode(id) {
          var code = document.getElementById(id)
        
          code.style.display = code.style.display != 'block' ? 'block' : 'none'
          return true
        }
        
        // Make codeblocks hidden by default
        document.writeln('<' + 'style type="text/css">.method .source pre { display: none }<\/style>')
      //]]>
    </script>
  </head>
  <body class='page'>
    <div class='class' id='wrapper'>
      <div class='header'>
        <h1 class='name'>
          <span class='type'>module</span>
          KRPC::Doc
        </h1>
        <ol class='paths'>
          <li>
            <a target="docwin" href="../../files/lib/krpc/doc_rb.html">lib/krpc/doc.rb</a>
          </li>
        </ol>
      </div>
      <div id='content'>
        <div id='text'>
          <div id='description'></div>
          <div id='method-list'>
            <h2>Methods</h2>
            <h3>Public Class</h3>
            <ol>
              <li><a target="docwin" href="#method-c-add_docstring_info">add_docstring_info</a></li>
              <li><a target="docwin" href="#method-c-add_special_docstring_info">add_special_docstring_info</a></li>
              <li><a target="docwin" href="#method-c-docstring_for_method">docstring_for_method</a></li>
              <li><a target="docwin" href="#method-c-docstring_for_procedure">docstring_for_procedure</a></li>
            </ol>
          </div>
          <div id='context'>
          </div>
          <div id='class-list'>
            <h2>Classes and Modules</h2>
            <ol>
              <li><a target="docwin" href="Doc/SuffixMethods.html">KRPC::Doc::SuffixMethods</a></li>
            </ol>
          </div>
          <div id='section'>
            <div id='methods'>
              <h2>Public Class methods</h2>
              <div class='method public-class' id='method-method-c-add_docstring_info'>
                <a name='method-c-add_docstring_info'></a>
                <div class='synopsis'>
                  <span class='name'>add_docstring_info</span>
                  <span class='arguments'>(is_static, cls, method_name, service_name="", procedure_name="", param_names=[], param_types=[], param_default=[], return_type: nil, xmldoc: "")</span>
                </div>
                <div class='description'>
                  
                </div>
                <div class='source'>
                  <a class='source-toggle' href='#' onclick="toggleCode('method-c-add_docstring_info-source'); return false">
                    [show source]
                  </a>
                  <pre id='method-c-add_docstring_info-source'><span class="ruby-comment"># File lib/krpc/doc.rb, line 32</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">add_docstring_info</span>(<span class="ruby-identifier">is_static</span>, <span class="ruby-identifier">cls</span>, <span class="ruby-identifier">method_name</span>, <span class="ruby-identifier">service_name</span>=<span class="ruby-string">&quot;&quot;</span>, <span class="ruby-identifier">procedure_name</span>=<span class="ruby-string">&quot;&quot;</span>, <span class="ruby-identifier">param_names</span>=[], <span class="ruby-identifier">param_types</span>=[], <span class="ruby-identifier">param_default</span>=[], <span class="ruby-identifier">return_type</span><span class="ruby-operator">:</span> <span class="ruby-keyword">nil</span>, <span class="ruby-identifier">xmldoc</span><span class="ruby-operator">:</span> <span class="ruby-string">&quot;&quot;</span>)&#x000A;  <span class="ruby-identifier">service_module_name</span> = <span class="ruby-identifier">service_name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">cls</span>.<span class="ruby-identifier">class_name</span> <span class="ruby-operator">?</span> <span class="ruby-constant">Services</span>.<span class="ruby-identifier">class_name</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">service_name</span>&#x000A;  <span class="ruby-identifier">key0</span> = [<span class="ruby-identifier">service_name</span>, <span class="ruby-identifier">procedure_name</span>].<span class="ruby-identifier">hash</span>&#x000A;  <span class="ruby-identifier">key1</span> = [<span class="ruby-identifier">service_module_name</span>, <span class="ruby-keyword">false</span>, <span class="ruby-identifier">cls</span>.<span class="ruby-identifier">class_name</span>, <span class="ruby-identifier">method_name</span>].<span class="ruby-identifier">hash</span>&#x000A;  <span class="ruby-identifier">val</span> = [<span class="ruby-identifier">cls</span>.<span class="ruby-identifier">krpc_name</span>, <span class="ruby-identifier">calc_separator</span>(<span class="ruby-identifier">is_static</span>), <span class="ruby-identifier">method_name</span>, <span class="ruby-identifier">param_names</span>, <span class="ruby-identifier">param_types</span>, <span class="ruby-identifier">param_default</span>, <span class="ruby-identifier">return_type</span>, <span class="ruby-identifier">xmldoc</span>]&#x000A;  <span class="ruby-ivar">@docstr_infos</span>[<span class="ruby-identifier">key1</span>] = <span class="ruby-ivar">@procedure_docstr_infos</span>[<span class="ruby-identifier">key0</span>] = <span class="ruby-identifier">val</span>&#x000A;  <span class="ruby-keyword">if</span> <span class="ruby-identifier">is_static</span>&#x000A;    <span class="ruby-identifier">key2</span> = [<span class="ruby-identifier">service_module_name</span>, <span class="ruby-keyword">true</span>, <span class="ruby-identifier">cls</span>.<span class="ruby-identifier">class_name</span>, <span class="ruby-identifier">method_name</span>].<span class="ruby-identifier">hash</span>&#x000A;    <span class="ruby-ivar">@docstr_infos</span>[<span class="ruby-identifier">key2</span>] = <span class="ruby-identifier">val</span>&#x000A;  <span class="ruby-keyword">end</span>&#x000A;<span class="ruby-keyword">end</span></pre>
                </div>
              </div>
              <div class='method public-class' id='method-method-c-add_special_docstring_info'>
                <a name='method-c-add_special_docstring_info'></a>
                <div class='synopsis'>
                  <span class='name'>add_special_docstring_info</span>
                  <span class='arguments'>(key, value)</span>
                </div>
                <div class='description'>
                  
                </div>
                <div class='source'>
                  <a class='source-toggle' href='#' onclick="toggleCode('method-c-add_special_docstring_info-source'); return false">
                    [show source]
                  </a>
                  <pre id='method-c-add_special_docstring_info-source'><span class="ruby-comment"># File lib/krpc/doc.rb, line 44</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">add_special_docstring_info</span>(<span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span>)&#x000A;  <span class="ruby-ivar">@docstr_infos</span>[<span class="ruby-identifier">key</span>] = <span class="ruby-identifier">value</span>&#x000A;<span class="ruby-keyword">end</span></pre>
                </div>
              </div>
              <div class='method public-class' id='method-method-c-docstring_for_method'>
                <a name='method-c-docstring_for_method'></a>
                <div class='synopsis'>
                  <span class='name'>docstring_for_method</span>
                  <span class='arguments'>(method_owner, method_name, is_print_xmldoc_summary = true)</span>
                </div>
                <div class='description'>
                  
                </div>
                <div class='source'>
                  <a class='source-toggle' href='#' onclick="toggleCode('method-c-docstring_for_method-source'); return false">
                    [show source]
                  </a>
                  <pre id='method-c-docstring_for_method-source'><span class="ruby-comment"># File lib/krpc/doc.rb, line 11</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">docstring_for_method</span>(<span class="ruby-identifier">method_owner</span>, <span class="ruby-identifier">method_name</span>, <span class="ruby-identifier">is_print_xmldoc_summary</span> = <span class="ruby-keyword">true</span>)&#x000A;  <span class="ruby-identifier">is_static</span>, <span class="ruby-identifier">class_cls</span> = <span class="ruby-identifier">method_owner</span>.<span class="ruby-identifier">class</span> <span class="ruby-operator">==</span> <span class="ruby-constant">Class</span> <span class="ruby-operator">?</span> [<span class="ruby-keyword">true</span>, <span class="ruby-identifier">method_owner</span>] <span class="ruby-operator">:</span> [<span class="ruby-keyword">false</span>, <span class="ruby-identifier">method_owner</span>.<span class="ruby-identifier">class</span>]&#x000A;  <span class="ruby-identifier">service_module_name</span>, <span class="ruby-identifier">class_name</span> = <span class="ruby-identifier">ruby_class_to_pb_module_class_pair</span>(<span class="ruby-identifier">class_cls</span>)&#x000A;  <span class="ruby-identifier">key</span> = [<span class="ruby-identifier">service_module_name</span>, <span class="ruby-identifier">is_static</span>, <span class="ruby-identifier">class_name</span>, <span class="ruby-identifier">method_name</span>.<span class="ruby-identifier">to_s</span>].<span class="ruby-identifier">hash</span>&#x000A;  <span class="ruby-keyword">if</span> <span class="ruby-ivar">@docstr_infos</span>.<span class="ruby-identifier">has_key?</span> <span class="ruby-identifier">key</span>&#x000A;    <span class="ruby-identifier">construct_docstring</span>(<span class="ruby-operator">*</span><span class="ruby-ivar">@docstr_infos</span>[<span class="ruby-identifier">key</span>], <span class="ruby-keyword">true</span>, <span class="ruby-identifier">is_static</span>, <span class="ruby-identifier">is_print_xmldoc_summary</span>)&#x000A;  <span class="ruby-keyword">else</span>&#x000A;    <span class="ruby-node">&quot;No docstring for #{class_cls.name}#{calc_separator(is_static)}#{method_name.to_s} method&quot;</span> <span class="ruby-operator">+</span>&#x000A;      (<span class="ruby-identifier">method_owner</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">method_name</span>) <span class="ruby-operator">?</span> <span class="ruby-string">&quot;&quot;</span> <span class="ruby-operator">:</span> <span class="ruby-string">&quot;\nThere is no such method -- maybe a typo&quot;</span>)&#x000A;  <span class="ruby-keyword">end</span>&#x000A;<span class="ruby-keyword">end</span></pre>
                </div>
              </div>
              <div class='method public-class' id='method-method-c-docstring_for_procedure'>
                <a name='method-c-docstring_for_procedure'></a>
                <div class='synopsis'>
                  <span class='name'>docstring_for_procedure</span>
                  <span class='arguments'>(service_name, procedure_name, is_print_xmldoc_summary = true)</span>
                </div>
                <div class='description'>
                  
                </div>
                <div class='source'>
                  <a class='source-toggle' href='#' onclick="toggleCode('method-c-docstring_for_procedure-source'); return false">
                    [show source]
                  </a>
                  <pre id='method-c-docstring_for_procedure-source'><span class="ruby-comment"># File lib/krpc/doc.rb, line 23</span>&#x000A;<span class="ruby-keyword">def</span> <span class="ruby-identifier">docstring_for_procedure</span>(<span class="ruby-identifier">service_name</span>, <span class="ruby-identifier">procedure_name</span>, <span class="ruby-identifier">is_print_xmldoc_summary</span> = <span class="ruby-keyword">true</span>)&#x000A;  <span class="ruby-identifier">key</span> = [<span class="ruby-identifier">service_name</span>, <span class="ruby-identifier">procedure_name</span>].<span class="ruby-identifier">hash</span>&#x000A;  <span class="ruby-keyword">if</span> <span class="ruby-ivar">@procedure_docstr_infos</span>.<span class="ruby-identifier">has_key?</span> <span class="ruby-identifier">key</span>&#x000A;    <span class="ruby-identifier">construct_docstring</span>(<span class="ruby-identifier">service_name</span>, <span class="ruby-string">&#39;.&#39;</span>, <span class="ruby-identifier">procedure_name</span>, <span class="ruby-operator">*</span><span class="ruby-ivar">@procedure_docstr_infos</span>[<span class="ruby-identifier">key</span>][<span class="ruby-value">3</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>], <span class="ruby-keyword">false</span>, <span class="ruby-keyword">false</span>, <span class="ruby-identifier">is_print_xmldoc_summary</span>)&#x000A;  <span class="ruby-keyword">else</span>&#x000A;    <span class="ruby-node">&quot;No docstring for #{service_name}.#{procedure_name} procedure&quot;</span>&#x000A;  <span class="ruby-keyword">end</span>&#x000A;<span class="ruby-keyword">end</span></pre>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div id='footer-push'></div>
    </div>
    <div id='footer'>
      <a target="docwin" href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
    </div>
  </body>
</html>
